package io.qar.tags.dao;

import io.qar.commons.mybatis.dao.BaseDao;
import io.qar.tags.entity.DishTagsEntity;
import io.qar.tags.entity.TagsEntity;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
* 菜单标签
*
* @author yyyyjinying 1020066395@qq.com
* @since 3.0 2024-06-10
*/
@Mapper
public interface TagsDao extends BaseDao<TagsEntity> {
	List<TagsEntity> tagByDishId(Long dishId, List<Long> tagIds);
	void delRelation(Long dishId, List<Long> tagIds);
	// 中间表的批量插入
	void batchInsertDishTagRelation(List<DishTagsEntity> lists);
	List<DishTagsEntity> findRelation(List<DishTagsEntity> lists);
	List<DishTagsEntity> findNotRelation(List<DishTagsEntity> lists);
	List<DishTagsEntity> selectRelationByTag(Long tagId);
//	DishTagsEntity findRelation(Long dishId, Long tagId);
	// 中间表的批量删除
	void deleteDishTagRelation(List<Long> dishIds, List<Long> tagIds);

}